#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

#define row 100
#define col 100

int main() {
	int n;
	int m;
	int c;
	int k;
	scanf("%d %d %d %d", &n, &m, &c, &k);

	int field[row][col];
	memset(field, 0, sizeof(int) * row * col);
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			scanf("%d", &field[i][j]);
		}
	}
	
	int dp[row][col];
	memset(dp, 0, sizeof(int) * row * col);
	dp[1][1] = field[1][1];
	for (int j = 2; j <= m; j++)dp[1][j] = dp[1][j - 1] + field[1][j];
	for (int i = 2; i <= n; i++)dp[i][1] = dp[i - 1][1] + field[i][1];
	for (int i = 2; i <= n; i++) {
		for (int j = 2; j <= m; j++) {
			dp[i][j] = dp[i - 1][j] + dp[i][j - 1] + field[i][j] - dp[i - 1][j - 1];
		}
	}

	int count = 0;
	for (int i = c; i <= n; i++) {
		for (int j = c; j <= m; j++) {
			int sum = dp[i][j] - dp[i - c][j] - dp[i][j - c] + dp[i - c][j - c];
			if (sum >= k) {
				count++;
			}
		}
	}
	printf("%d", count);
	return 0;

}